﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Assignment5
{
    public class Customer
    {
        string Name;
        bool IsVIP;
        public bool getIsVIP() { return IsVIP; }
        public string getName() { return Name; }
        public Customer(string name, bool isVIP)
        {
            Name = name;
            IsVIP = isVIP;
        }

        public override bool Equals(object obj)
        {
            Customer customer = (Customer)obj;
            return customer.Name.Equals(Name)&customer.getIsVIP().Equals(IsVIP);
        }

        //重写GetHashCode方法
        public override int GetHashCode()
        {
            return Name.GetHashCode()+IsVIP.GetHashCode();
        }
    }
}
